package com.pingao.mp.modular.fls.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 活动奖项
 * </p>
 *
 * @author 闻品高
 * @since 2020-01-15
 */
@TableName("fls_activity_awards")
@Data
public class ActivityAwards extends Model<ActivityAwards> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 活动ID
     */
    private Integer activityId;

    /**
     * 奖项名称
     */
    private String name;

    /**
     * 奖项昵称
     */
    private String nick;

    /**
     * 概率
     */
    private Float probability;

    /**
     * 金额（为0代表无优惠）
     */
    private Float amount;

    /**
     * 折扣（为0代表无折扣），金额和折扣同时存在时，以最大价值的为准
     */
    private Float discount;

    /**
     * 备注
     */
    private String remark;
    /**
     *
     * 奖品数量，为0代表无限
     */
    private Integer number;
    @Override
    protected Serializable pkVal() {
        return this.id;
    }


    public  static final String COL_ID = "id";
    public  static final String COL_ACTIVITY_ID = "activity_id";
    public  static final String COL_NAME = "name";
    public  static final String COL_NICK = "nick";
    public  static final String COL_PROBABILITY = "probability";
    public  static final String COL_AMOUNT = "amount";
    public  static final String COL_DISCOUNT = "discount";
    public  static final String COL_REMARK = "remark";
    public  static final String COL_NUMBER = "number";
}
